# Dusty by sizakor
# Paper Cut by ElTimablo

# Version 0.1
gtk_color_scheme = "fg_color:#e5dad0\nbg_color:#796553\nbase_color:#796553\ntext_color:#e5dad0\nselected_bg_color:#58493c\nselected_fg_color:#e5dad0\ntooltip_bg_color:#58493c\ntooltip_fg_color:#e5dad0"


gtk-button-images = 0 # doesn't seem to have any effect, but i'll leave it here anyway
gtk-icon-sizes = "gtk-button=16,16"

# Uncomment the following for general compactness! Or edit as you like for partial compactness.
#gtk-icon-sizes	= "gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:panel-menu=16,16:gtk-button=16,16"

style "theme-default"
{
	#GtkButton      ::child-displacement-x = 1
	GtkButton      ::child-displacement-y = 1
	GtkButton      ::default-border       = { 0, 0, 0, 0 }
	GtkCheckButton ::indicator-size       = 15 # Why 14 !!!

	GtkPaned       ::handle-size          = 6 # ???

	GtkRange       ::trough-border        = 0
	GtkRange       ::slider-width         = 8
	GtkRange       ::stepper-size         = 15

	GtkScale       ::slider-length        = 30
	GtkScale       ::trough-side-details  = 1
	GtkScrollbar   ::min-slider-length    = 35

	GtkRange       ::trough-under-steppers = 0
	#GtkScrolledWindow::scrollbar-spacing  = 1

	GtkScrollbar::has-backward-stepper           = 0
	GtkScrollbar::has-secondary-backward-stepper = 0
	
	GtkScrollbar::has-forward-stepper           = 0
	GtkScrollbar::has-secondary-forward-stepper = 0

	GtkMenuBar     ::internal-padding     = 0
	GtkToolbar     ::internal-padding     = 0

	GtkExpander    ::expander-size        = 15
	GtkTreeView    ::expander-size        = 15
	GtkTreeView    ::vertical-separator   = 1

	GtkMenu        ::horizontal-padding   = 0
	GtkMenu        ::vertical-padding     = 0

	WnckTasklist   ::fade-overlay-rect    = 0

	GtkTreeView    ::odd_row_color	      = shade (0.95,@base_color)

    GtkMenuBar     :: shadow-type        = GTK_SHADOW_NONE
	GtkToolbar     :: shadow-type	      = GTK_SHADOW_NONE
    GtkToolbar::space-size = 4
	GtkWidget::focus-padding = 0   
	       
    GtkEntry::honors-transparent-bg-hint = 1

	xthickness = 1
	ythickness = 1

	fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[ACTIVE]        = @fg_color
	fg[INSENSITIVE]   = shade (0.6, @bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT] 	  = shade(1.1, @selected_bg_color)
	bg[SELECTED]	  = @selected_bg_color
	bg[ACTIVE]        = shade(0.9, @bg_color)
	bg[INSENSITIVE]   = @bg_color

	base[NORMAL]      = @base_color	
	base[PRELIGHT]    = @base_color
	base[SELECTED]    = @selected_bg_color
	base[ACTIVE]      = @selected_bg_color
	base[INSENSITIVE] = shade(1.03, @bg_color)

	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[SELECTED]    = @selected_fg_color
	text[ACTIVE]      = @selected_fg_color
	text[INSENSITIVE] = shade (0.6, @bg_color)

	engine "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		colorize_scrollbar  = TRUE  # FALSE = disabled, TRUE = enabled
		contrast            = 0.8   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		focus_color	    = @selected_bg_color
		glazestyle          = 1     # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight
		glow_shade          = 1.0 # 0.1-2.0
		glowstyle           = 2 # 0 = top, 1 = bottom, 2 = top & bottom, 3 = horizontal, 4 = centered
		gradient_shades     = {1.00,1.00,1.00,1.00} # flat
		gradients           = FALSE  # FALSE = disabled, TRUE = enabled
		highlight_shade     = 1.0   # set highlight amount for buttons or widgets
		lightborder_shade   = 0.9   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 0     # 0 = lightborder on top side, 1 = lightborder on all sides
		listviewheaderstyle = 2     # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle       = 1     # 0 = nothing, 1 = dotted
		menubarstyle        = 0     # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
		menubaritemstyle    = 1     # 0 = menuitem look, 1 = button look
		menuitemstyle       = 0     # 0 = flat, 1 = glassy, 2 = striped
		menustyle           = 0     # 0 = plain, 1 = vertical stripe
		progressbarstyle    = 2     # 0 = plain, 1 = stripes, 2 = cells
		profile		    = CLEARLOOKS # engine style options: CANDIDO, CLEARLOOKS, MIST, MURRINE, NODOKA
		reliefstyle	    = 0     # 0 = flat, 1 = inset, 2 = shadow
		rgba		    = FALSE # FALSE = disabled, TRUE = enabled
		roundness           = 2     # 0 - 8
		#scrollbar_color    = "#fff"
		scrollbarstyle      = 0     # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		sliderstyle         = 0     # 0 = nothing added, 1 = handles
		stepperstyle        = 0     # 0 = standard, 1 = integrated stepper handles, 2 = unknown
		toolbarstyle	    = 0     # 0 = flat, 1 = glassy, 2 = gradient
	}
}

style "theme-zero"
{
	xthickness = 0
	ythickness = 0	
}

style "theme-wide"
{
	xthickness = 2
	ythickness = 2
}

style "theme-wider"
{
	xthickness = 3
	ythickness = 3
}

style "theme-button" = "theme-wider"
{
	bg[NORMAL]   = shade (1.09, @bg_color)
	#bg[PRELIGHT] = shade (1.09, @bg_color)
}

style "theme-notebook" = "theme-wide"
{
	bg[NORMAL] = shade (1.05, @bg_color)
}

style "theme-tasklist" = "theme-wide"
{
}

style "theme-menu" = "theme-zero"
{
#	ythickness = 4

	bg[NORMAL] = shade (1.05, @bg_color)
}

style "theme-menu-item" = "theme-wider"
{
	fg[PRELIGHT]   = @selected_fg_color
	fg[SELECTED]   = @selected_fg_color

	bg[PRELIGHT]   = @selected_bg_color
	bg[SELECTED]   = @selected_bg_color

	text[NORMAL]   = @selected_fg_color
	text[PRELIGHT] = @selected_fg_color
	text[ACTIVE]   = @selected_fg_color

	engine "murrine" {
		lightborder_shade = 2.0
		roundness         = 2
	}
}

style "theme-menubar-item" = "theme-menu-item"
{
	engine "murrine" {
		roundness = 2
	}
}

style "theme-separator-menu-item"
{
	GtkSeparatorMenuItem::horizontal-padding = 4
	# We are setting the desired height by using wide-separators.
	# There is no other way to get the odd height ...
	GtkWidget::wide-separators = 1
	GtkWidget::separator-width = 1
	GtkWidget::separator-height = 7
	xthickness = 1
	ythickness = 0
}

style "theme-treeview"
{
	bg[SELECTED] = @selected_bg_color

  	engine "murrine" {
		roundness = 0
	}
}

style "theme-treeview-header"
{
	xthickness = 2
	ythickness = 1

	bg[NORMAL]   = shade (1.09, @bg_color)
	bg[PRELIGHT] = shade (1.09, @bg_color)
}

style "theme-frame-title"
{
	fg[NORMAL] = shade (0.7, @fg_color)
}

style "theme-tooltips" = "theme-wider"
{
	bg[NORMAL] = shade (1.05, @bg_color)
}

style "theme-progressbar" = "theme-zero"
{
	fg[PRELIGHT] = @selected_fg_color

	engine "murrine" {
		lightborder_shade = 2.0
		roundness         = 0
	}

}

style "theme-statusbar"
{
}

style "theme-comboboxentry" = "theme-button"
{
}

style "theme-spinbutton" 
{
	bg[NORMAL]   = shade (1.09, @bg_color)
	bg[PRELIGHT] = shade (1.09, @bg_color)
}

style "theme-scale" = "theme-button"
{
	GtkRange::trough-border = 0 # !!! maybe more padding (2) is nicer?
}

style "theme-hscale"
{
}

style "theme-vscale"
{
}

style "theme-scrollbar"
{
    fg[NORMAL] = "#000000"
	engine "murrine" {
		lightborder_shade = 2.0
		roundness         = 2
	}
}

style "theme-hscrollbar"
{
}

style "theme-vscrollbar"
{
}

style "metacity-frame"
{
}

style "theme-radiocheck"
{
	text[NORMAL]   = @selected_fg_color
	text[PRELIGHT] = @selected_fg_color
	text[ACTIVE]   = @selected_fg_color

	engine "murrine" {
		lightborder_shade = 2.0
		roundness         = 1
	}
}

style "theme-panel"
{
}

style "theme-menubar"
{
}

style "theme-toolbar"
{
	#bg[NORMAL] = shade (1.05, @bg_color)
}

style "theme-nautilus-location"
{
	bg[NORMAL] = @bg_color
}

style "evolution-hack" = "theme-default" # Hacks for Evolution Mail.
{	
	fg[ACTIVE] = @tooltip_fg_color # Color for evo active text.
	fg[SELECTED] = @tooltip_fg_color # Color for evo selected text.

	bg[NORMAL]      = shade (1.09, @bg_color)
	bg[PRELIGHT]    = shade (1.09, @bg_color)
	bg[SELECTED]    = @tooltip_bg_color
	bg[ACTIVE]      = @tooltip_bg_color # Color for unfocused evo selected items.
	bg[INSENSITIVE] = @bg_color # !!! not sure. triggers when evo shuts down
}

#########################################
# Matches
#########################################

# Theme radio buttons and checkmarks
class "GtkRadio*"                        		style "theme-radiocheck"
class "GtkCheck*"                           		style "theme-radiocheck"

# Keep proper colour for Metacity
class "MetaFrames" 					style "metacity-frame"
#class "GtkWindow"    			    		style "metacity-frame"

# Theme default style is applied to every widget
class "GtkWidget"    					style "theme-default"

# Increase the x/ythickness in some widgets
class "GtkToolbar"   					style "theme-toolbar" 
class "GtkRange"     					style "theme-wide"
class "GtkFrame"     					style "theme-wide"
class "GtkSeparator" 					style "theme-wide"
class "GtkEntry"     					style "theme-wider"

class "GtkSpinButton"  					style "theme-spinbutton"
class "GtkScale"       					style "theme-scale"
class "GtkVScale"      					style "theme-vscale"
class "GtkHScale"      					style "theme-hscale"
class "GtkScrollbar"   					style "theme-scrollbar"
class "GtkVScrollbar"  					style "theme-vscrollbar"
class "GtkHScrollbar"  					style "theme-hscrollbar"

# General matching following, the order is choosen so that the right styles override each other
# eg. progressbar needs to be more important then the menu match.

# This is not perfect, it could be done better
# (That is modify *every* widget in the notebook, and change those back that
# we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>"     	style "theme-notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"		style "theme-notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       	style "theme-notebook"

widget_class "*<GtkButton>"      			style "theme-button"
widget_class "*<GtkNotebook>"    			style "theme-notebook"
widget_class "*<GtkStatusbar>*"  			style "theme-statusbar"

widget_class "*<GtkComboBoxEntry>*"			style "theme-comboboxentry"
widget_class "*<GtkCombo>*"         			style "theme-comboboxentry"

widget_class "*<GtkMenuBar>*"           		style "theme-menubar"
widget_class "*<GtkMenu>*"              		style "theme-menu"
widget_class "*<GtkMenuItem>*"          		style "theme-menu-item"
widget_class "*.<GtkMenuBar>.*"				style "theme-menubar-item"
widget_class "*<GtkSeparatorMenuItem>*" 		style "theme-separator-menu-item"

widget_class "*.<GtkFrame>.<GtkLabel>" 			style "theme-frame-title"
widget_class "*.<GtkTreeView>*"        			style "theme-treeview"

widget_class "*<GtkProgressBar>"       			style "theme-progressbar"

# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" 		style "theme-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>"    		style "theme-treeview-header"
widget_class "*.<GtkList>.<GtkButton>"     		style "theme-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>"    		style "theme-treeview-header"
widget_class "*.<GtkTreeView>*<GtkLabel>*"		style "theme-treeview-header"         # DARK: ensure GtkTreeView header text is light
widget_class "*.<GtkTreeView>*<GtkArrow>*"		style:highest "theme-treeview-header" # DARK: ensure GtkArrows are light 

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"    			style "theme-treeview-header"
widget_class "*.ETree.ECanvas"    			style "theme-treeview-header"
widget_class "*GtkCTree*"	style "evolution-hack"
widget_class "*GtkList*"	style "evolution-hack"
widget_class "*GtkCList*"	style "evolution-hack"
widget_class "*.ETree.*"	style "evolution-hack"
widget_class "*EInfoLabel*"	style "evolution-hack"

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip*" 					style "theme-tooltips"

###################################################
# Special cases and work arounds
###################################################

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" 			style : highest "theme-nautilus-location"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in
# appears-as-list mode.
# Similar hack also in the menuitem style.
# This style does not affect GtkComboBoxEntry, it does have an effect
# on comboboxes in appears-as-list mode though.
style "theme-combobox-text-color-workaround"
{
	text[NORMAL]      = @fg_color
	text[PRELIGHT]    = @fg_color
	text[SELECTED]    = @selected_fg_color
	text[ACTIVE]      = @fg_color #???
	text[INSENSITIVE] = shade (0.6, @bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"		style "theme-combobox-text-color-workaround"

style "theme-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color # !!!
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = shade (0.6, @bg_color)
}

widget "*.gtk-combobox-popup-menu.*"   			style "theme-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "theme-fg-is-text-color-workaround"
{
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @tooltip_fg_color
	fg[SELECTED]    = @tooltip_fg_color
	fg[INSENSITIVE] = shade (0.6, @bg_color)
}

widget_class "*<GtkListItem>*" 				style "theme-fg-is-text-color-workaround"

# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" 				style "theme-fg-is-text-color-workaround"

style "theme-evo-new-button-workaround"
{
	engine "murrine" {
		toolbarstyle = 0
	}
}

widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "theme-evo-new-button-workaround"

# Hack for nautilus renaming in dark themes[DarkRoom]
style "theme-darker"
{
        fg[NORMAL] = @text_color
        fg[ACTIVE] = @text_color
	#bg[NORMAL] = @base_color # destroys scrollbar border
}
widget "*auti*IconView*"                        style : highest "theme-darker"

# Theme panel elements
widget "*PanelWidget*" 					style "theme-panel"
widget "*PanelApplet*" 					style "theme-panel"
widget "*fast-user-switch*"				style "theme-panel" # workaround for Fast User Switch applet
class "PanelApp*" 					style "theme-panel"
class "PanelToplevel*" 					style "theme-panel"
widget_class "*Mail*" 					style "theme-panel"
widget_class "*notif*" 					style "theme-panel"
widget_class "*Notif*" 					style "theme-panel"
